home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network CD 1
/
Network CD.iso
/
amospd
/
521-530
/
apd529
/
tech-battle.amos
/
tech-battle.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1993-01-08
|
75KB
|
2,557 lines
Set Buffer 28
Screen Open 0,400,256,32,Lowres
Flash Off : Curs Off
Load Iff "iff/tech.letters.iff"
Screen Hide 0
X=3
For A=1 To 10
Get Bob 0,A,X,14 To X+22,36
X=X+22
Next A
X=3
For A=1 To 9
Get Bob 0,A+10,X,48 To X+22,70
X=X+22
Next A
X=3
For A=1 To 6
Get Bob 0,A+19,X,78 To X+22,100
X=X+22
Next A
Load Iff "iff/tech.title.iff"
Flash Off : Curs Off
Screen Show 0
Def Scroll 1,0,190 To 375,212,-1,0
Shift Down 2,3,16,1
Music 1
Tempo 8
A$="..... hello every one out there in amiga land"
A$=A$+"..... yes its the old text scroller in the p.d program "
A$=A$+"and before you say anything i know its awful ."
A$=A$+"the scroller that is not the game ......."
A$=A$+"so just sit back and read this if you want to or you could "
A$=A$+"always press the mouse key and start my first attempt at "
A$=A$+"a full game ....... this game was written over five weekends "
A$=A$+"and a few late nights when there was nothing else to do . "
A$=A$+"the main program extends over two thousand and five hundred lines of text "
A$=A$+"and has a text buffer of twenty eight kb so by the time "
A$=A$+"you add sprites and screens it just wouldnt fit in a half"
A$=A$+"meg machine sorry about that .."
A$=A$+" anyone looking at the master program will soon descover that "
A$=A$+"i am a very untidy programer so any beginers out there look at "
A$=A$+"the code if you like but dont follow my example pleaseee . "
A$=A$+" anyway thats enough crap about the program ...... "
A$=A$+" by the way if you like the game please drop me a letter "
A$=A$+"as i would like to hear any comments you might have "
A$=A$+"at bellevue rosevale seven two nine two tasmania "
A$=A$+"and yes its a farm address if it looks a bit odd "
A$=A$+"........ and now for a bit of dribble about myself "
A$=A$+"people that know me call me rag you can guess why "
A$=A$+"i drive a red celica which i just bent badly so its in the bobyworks"
A$=A$+" getting fixed yes speeding yet again i cant help it. "
A$=A$+"come on who ever you are start the game i am sick of typing "
A$=A$+" i am going to bed ................................... "
A$=A$+"youre not still reading are you ahhhhh you are ....back to the start.... z"
Z=0
LETTER=1
Do
Scroll 1
Inc Z
If Z=20 Then Gosub NLETTER
If Mouse Key<>0 Then Goto QUESTIONS
Loop
NLETTER:
B$=Mid$(A$,LETTER,1) : If B$="z" Then LETTER=1
If B$="a" Then Paste Bob 350,190,1
If B$="b" Then Paste Bob 350,190,2
If B$="c" Then Paste Bob 350,190,3
If B$="d" Then Paste Bob 350,190,4
If B$="e" Then Paste Bob 350,190,5
If B$="f" Then Paste Bob 350,190,6
If B$="g" Then Paste Bob 350,190,7
If B$="h" Then Paste Bob 350,190,8
If B$="i" Then Paste Bob 350,190,9
If B$="j" Then Paste Bob 350,190,10
If B$="k" Then Paste Bob 350,190,11
If B$="l" Then Paste Bob 350,190,12
If B$="m" Then Paste Bob 350,190,13
If B$="n" Then Paste Bob 350,190,14
If B$="o" Then Paste Bob 350,190,15
If B$="p" Then Paste Bob 350,190,16
If B$="r" Then Paste Bob 350,190,17
If B$="s" Then Paste Bob 350,190,18
If B$="t" Then Paste Bob 350,190,19
If B$="u" Then Paste Bob 350,190,20
If B$="v" Then Paste Bob 350,190,21
If B$="w" Then Paste Bob 350,190,22
If B$="x" Then Paste Bob 350,190,23
If B$="y" Then Paste Bob 350,190,24
If B$="." Then Paste Bob 350,190,25
Inc LETTER
Z=0
Return
QUESTIONS:
Shift Off
Cls
Print
Print
Print " INSTRUCTIONS left = no / right = yes"
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto MAIN
Cls
Print "INSTRUCTIONS"
Print
Print "The game is fully mouse driven, using pull"
Print "down menus which open up from the pointers"
Print "location. Which does mean you have to "
Print "move the pointer to the left of the screen"
Print "so you can see the whole menu . Sorry "
Print "about that but it was the neatest way i "
Print "could think of doing it at the time ."
Print
Print "The play field can be scolled around "
Print "by moving the pionter to far right or "
Print "far left of the screen."
Print "There is also a partial rebuild of "
Print "each players forces every 10 days"
Print "of conflict where damaged ships have "
Print "one piont of strength returned and "
Print "players get 1 long range fighter and 1"
Print "short range fighter returned to them if"
Print "1 or more have been destroyed."
Print "There is no set order for the players"
Print "to take there turn . That has been left"
Print "to you, whether you change every move "
Print "or only after each player has done"
Print "all his moves for the day."
Print
Print "There is three main menu items for each"
Print "side these are EXTRAS , MOVE and FIRE "
Print
Print "press mouse key to continue"
Repeat : Until Mouse Key=0
Repeat : Until Mouse Key<>0
Cls
Print "EXTRAS :"
Print
Print "DONE :"
Print "Exit the days fighting."
Print "also gives you list of stength"
Print "and fuel remaining for all your craft"
Print "and instilations."
Print "LAUNCH - short and long rang fighters "
Print "Puts you aircraft in the sky"
Print "just move the mouse to the location"
Print "and press either mouse button."
Print "MAX long range fighters 8 "
Print "MAX short range fighters 5 "
Print "LAND - short and long range fighters "
Print "lands all aircraft that are "
Print "close to airbase (long range)"
Print "close to carrier (short range)"
Print "NIGHT BOMBER"
Print "Can only be used after 50 days of "
Print "conflict and you only get 2 of them."
Print "Can only be fired at enemys main base"
Print "area . Just move pionter to target"
Print "and press either mouse button"
Print "MISSLE"
Print "Can only be used after 30 days of"
Print "conflict and you only get 3 of them."
Print "is fired in the same way as the "
Print "night bomber . This weapon can hit "
Print "many targets if they are close together"
Print
Print "mouse key continue"
Repeat : Until Mouse Key=0
Repeat : Until Mouse Key<>0
Cls
Print "MOVE"
Print
Print "CARRIER"
Print
Print "Just piont to new location and press"
Print "either mouse button "
Print
Print "DESTROYERS - AIRCRAFT - PATROL BOATS"
Print
Print "A red target will appear over "
Print "the craft you are about to move "
Print "if you dont want to move that craft"
Print "press the left button to go to the "
Print "next craft of that type ."
Print "Otherwise press the right button "
Print "piont to the new location and "
Print "and press again to move."
Print
Print "press mouse key to continue"
Repeat : Until Mouse Key=0
Repeat : Until Mouse Key<>0
Cls
Print "FIRE"
Print
Print "CARRIER"
Print
Print "Press left button to select direction"
Print "to fire in (red target)."
Print "press right button to select it "
Print "then press either button when "
Print "the horizontal and vertical bars"
Print "line up with the target to fire."
Print
Print "DESTROYER"
Print
Print "Select which destroyer to fire in"
Print "the same way that you do to move craft"
Print "then its the same as the carrier"
Print
Print "OTHER CARFT AND INSTALATIONS"
Print
Print "Select which object to fire in the "
Print "same way thet you do to move craft"
Print "then press either button when"
Print "the horizontal and vertical bars"
Print "line up with the target to fire."
Print
Print "press mouse key to continue "
Repeat : Until Mouse Key=0
Repeat : Until Mouse Key<>0
Cls
Print "Each object in the game has a different"
Print "strength fire power."
Print "field cannons , short range fighters"
Print "long range fighters and patrol boats"
Print "all have a hit strength of 1."
Print "long range cannons and scatter cannons"
Print "both have a hit strength of 2."
Print "destroyers have a hit strength of 1"
Print "but there front cannon has a strength"
Print "of 2."
Print "carriers have a hit strength of"
Print "1 to the right and left ."
Print "2 to the rear and 3 to the front"
Print "cannons."
Print
Print "press mouse key to continue "
Repeat : Until Mouse Key=0
Repeat : Until Mouse Key<>0
MAIN:
Music Off
Rem screen setup bob data
Screen Open 1,320,256,16,Lowres
Screen Open 0,980,247,16,Lowres
Load Iff "iff/tech.back3.iff"
Screen Copy 0,0,0,320,256 To 0,640,0
Load Iff "iff/tech.back2.iff"
Screen Copy 0,0,0,320,256 To 0,320,0
Load Iff "iff/tech.back1.iff"
Load "sprites/tech-ship2.abk"
Rem basic setup variables etc
Limit Mouse 115,50 To 443,295
Reserve Zone 64
Flash Off : Curs Off
Dim FX1(4) : Dim FY1(4) : Dim FX2(4) : Dim FY2(4)
Dim LX1(2) : Dim LY1(2) : Dim LX2(2) : Dim LY2(2)
Dim SX1(2) : Dim SY1(2) : Dim SX2(2) : Dim SY2(2)
Dim DX1(2) : Dim DY1(2) : Dim DX2(2) : Dim DY2(2)
Dim PX1(3) : Dim PY1(3) : Dim PX2(3) : Dim PY2(3)
Dim AX1(5) : Dim AY1(5) : Dim BX1(8) : Dim BY1(8)
Dim AX2(5) : Dim AY2(5) : Dim BX2(8) : Dim BY2(8)
Dim A1(5) : Dim B1(8) : Dim BS1(8)
Dim A2(5) : Dim B2(8) : Dim BS2(8)
Dim FS1(4) : Dim LS1(2) : Dim SS1(2) : Dim DS1(2) : Dim PS1(3)
Dim FS2(4) : Dim LS2(2) : Dim SS2(2) : Dim DS2(2) : Dim PS2(3)
Dim M1(30) : Dim M2(30) : Dim BF1(8) : Dim BF2(8) : Dim AF1(5) : Dim AF2(5)
For A=1 To 4
FS1(A)=3
FS2(A)=3
Next A
For A=1 To 2
LS1(A)=5 : LS2(A)=5
SS1(A)=5 : SS2(A)=5
DS1(A)=8 : DS2(A)=8
Next A
For A=1 To 3
PS1(A)=5 : PS2(A)=5
Next A
For A=1 To 5
A1(A)=0
A2(A)=0
Next A
For A=1 To 8
B1(A)=0
B2(A)=0
BS1(A)=2
BS2(A)=2
Next A
MS1=30 : MS2=30 : GS1=25 : GS2=25 : CS1=12 : CS2=12
MX1=4 : MY1=113 : MX2=940 : MY2=94
AAX1=30 : AAY1=150 : AAX2=895 : AAY2=154
CX1=175 : CY1=196 : CX2=765 : CY2=81
FX1(1)=135 : FX1(2)=159 : FX1(3)=129 : FX1(4)=67
FY1(1)=41 : FY1(2)=141 : FY1(3)=179 : FY1(4)=215
FX2(1)=827 : FX2(2)=790 : FX2(3)=800 : FX2(4)=804
FY2(1)=183 : FY2(2)=126 : FY2(3)=104 : FY2(4)=56
LX1(1)=167 : LX1(2)=68 : LY1(1)=102 : LY1(2)=54
LX2(1)=774 : LX2(2)=772 : LY2(1)=146 : LY2(2)=212
SX1(1)=40 : SX1(2)=36 : SY1(1)=135 : SY1(2)=101
SX2(1)=890 : SX2(2)=902 : SY2(1)=115 : SY2(2)=71
DX1(1)=175 : DX1(2)=176 : DY1(1)=233 : DY1(2)=48
DX2(1)=766 : DX2(2)=799 : DY2(1)=183 : DY2(2)=22
PX1(1)=142 : PX1(2)=107 : PX1(3)=119 : PY1(1)=218 : PY1(2)=162 : PY1(3)=82
PX2(1)=827 : PX2(2)=839 : PX2(3)=821 : PY2(1)=37 : PY2(2)=90 : PY2(3)=230
Bob 35,MX1,MY1,47 : Bob 36,AAX1,AAY1,46 : Bob 51,MX2,MY2,47 : Bob 52,AAX2,AAY2,46
Set Zone 35,MX1,MY1 To MX1+18,MY1+17 : Set Zone 36,AAX1,AAY1 To AAX1+50,AAY1+12
Set Zone 51,MX2,MY2 To MX2+18,MY2+17 : Set Zone 52,AAX2,AAY2 To AAX2+50,AAY2+12
Bob 37,CX1,CY1,43 : Bob 53,CX2,CY2,42
Set Zone 37,CX1,CY1 To CX1+36,CY1+11 : Set Zone 53,CX2,CY2 To CX2+36,CY2+11
For A=1 To 4
Bob 26+A,FX1(A),FY1(A),38
Set Zone 26+A,FX1(A),FY1(A) To FX1(A)+12,FY1(A)+10
Bob 42+A,FX2(A),FY2(A),37
Set Zone 42+A,FX2(A),FY2(A) To FX2(A)+12,FY2(A)+10
Next A
For A=1 To 2
Bob 30+A,LX1(A),LY1(A),40
Set Zone 30+A,LX1(A),LY1(A) To LX1(A)+19,LY1(A)+10
Bob 32+A,SX1(A),SY1(A),41
Set Zone 32+A,SX1(A),SY1(A) To SX1(A)+10,SY1(A)+10
Bob 37+A,DX1(A),DY1(A),26
Set Zone 37+A,DX1(A),DY1(A) To DX1(A)+29,DY1(A)+9
Bob 46+A,LX2(A),LY2(A),39
Set Zone 46+A,LX2(A),LY2(A) To LX2(A)+19,LY2(A)+10
Bob 48+A,SX2(A),SY2(A),41
Set Zone 48+A,SX2(A),SY2(A) To SX2(A)+10,SY2(A)+10
Bob 53+A,DX2(A),DY2(A),25
Set Zone 53+A,DX2(A),DY2(A) To DX2(A)+29,DY2(A)+9
Next A
For A=1 To 3
Bob 39+A,PX1(A),PY1(A),17
Set Zone 39+A,PX1(A),PY1(A) To PX1(A)+15,PY1(A)+7
Bob 55+A,PX2(A),PY2(A),18
Set Zone 55+A,PX2(A),PY2(A) To PX2(A)+15,PY2(A)+7
Next A
For A=1 To 8
BS1(A)=2 : BS2(A)=2
Next A
For A=1 To 5
AF1(A)=10 : AF2(A)=10
Next A
GTIME=0 : LFUEL=0 : PRODUTION=0 : P1BOM=2 : P2BOM=2 : P1MIS=3 : P2MIS=3
Rem mouse movement
Channel 1 To Screen Offset 0
A$="Loop : ;"
A$=A$+"Let RA = X ;"
A$=A$+"If XM > 435 Jump Aa ;"
A$=A$+"If XM < 120 Jump Bb ;"
A$=A$+"Pause ; Jump Loop ;"
A$=A$+"Bb : ;"
A$=A$+"If X < 5 Jump Loop ;"
A$=A$+"Let X = X - 5 ; Pause ; Jump Loop ;"
A$=A$+"Aa : ;"
A$=A$+"If X > 625 Jump Loop ;"
A$=A$+"Let X = X + 5 ; Pause ; Jump Loop "
Amal 1,A$
Amal On 1
Rem menu
Menu$(1)="p1 ext "
Menu$(2)="P1 M "
Menu$(3)="P1 F "
Menu$(4)="p2 ext "
Menu$(5)="P2 M "
Menu$(6)="P2 F "
Menu$(1,1)="done" : Menu$(1,2)="night bombers"
Menu$(1,3)="missle"
Menu$(1,4)="launch short range fighter"
Menu$(1,5)="launch long range fighter"
Menu$(1,6)="land short range fighter"
Menu$(1,7)="land long rang fighter"
Menu$(4,1)="night bombers"
Menu$(4,2)="missle"
Menu$(4,3)="launch short range fighter"
Menu$(4,4)="launch long range fighter"
Menu$(4,5)="land short range fighter"
Menu$(4,6)="land long rang fighter"
Menu$(2,1)="carrier" : Menu$(3,1)="carrier"
Menu$(2,2)="destroyers" : Menu$(3,2)="destroyers"
Menu$(2,3)="patrol boats" : Menu$(3,3)="patrol boats"
Menu$(2,4)="short range fighters"
Menu$(3,4)="short range fighters"
Menu$(2,5)="long range fighters"
Menu$(3,5)="long range fighters"
Menu$(3,6)="field cannons"
Menu$(3,7)="long range cannons"
Menu$(3,8)="scatter cannons"
Menu$(5,1)="carrier" : Menu$(6,1)="carrier"
Menu$(5,2)="destroyers" : Menu$(6,2)="destroyers"
Menu$(5,3)="patrol boats" : Menu$(6,3)="patrol boats"
Menu$(5,4)="short range fighters"
Menu$(6,4)="short range fighters"
Menu$(5,5)="long range fighters"
Menu$(6,5)="long range fighters"
Menu$(6,6)="field cannons"
Menu$(6,7)="long range cannons"
Menu$(6,8)="scatter cannons"
Menu Mouse On
Menu On
Rem main loop
On Menu Gosub P1DONE,P1MOVE,P1FIRE,P2DONE,P2MOVE,P2FIRE
On Menu On
Do
Loop
Rem player one done
P1DONE:
Z=Choice(2)
If Z=1 Then Gosub P1STAT
If Z=2 Then Gosub P1B
If Z=3 Then Gosub P1M
If Z=4 Then Gosub P1SL
If Z=5 Then Gosub P1LL
If Z=6 Then Gosub P1SLL
If Z=7 Then Gosub P1LLL
On Menu On
Return
Rem player one move
P1MOVE:
Z=Choice(2)
If Z=1 Then Gosub P1CM
If Z=2 Then Gosub P1DM
If Z=3 Then Gosub P1PM
If Z=4 Then Gosub P1SM
If Z=5 Then Gosub P1LM
On Menu On
Return
Rem player one fire
P1FIRE:
Z=Choice(2)
If Z=1 Then Gosub P1CF
If Z=2 Then Gosub P1DF
If Z=3 Then Gosub P1PF
If Z=4 Then Gosub P1SF
If Z=5 Then Gosub P1LF
If Z=6 Then Gosub P1FF
If Z=7 Then Gosub P1LCF
If Z=8 Then Gosub P1SCF
On Menu On
Return
Rem player two done
P2DONE:
Z=Choice(2)
If Z=1 Then Gosub P2B
If Z=2 Then Gosub P2M
If Z=3 Then Gosub P2SL
If Z=4 Then Gosub P2LL
If Z=5 Then Gosub P2SLL
If Z=6 Then Gosub P2LLL
On Menu On
Return
Rem player two move
P2MOVE:
Z=Choice(2)
If Z=1 Then Gosub P2CM
If Z=2 Then Gosub P2DM
If Z=3 Then Gosub P2PM
If Z=4 Then Gosub P2SM
If Z=5 Then Gosub P2LM
On Menu On
Return
Rem player two fire
P2FIRE:
Z=Choice(2)
If Z=1 Then Gosub P2CF
If Z=2 Then Gosub P2DF
If Z=3 Then Gosub P2PF
If Z=4 Then Gosub P2SF
If Z=5 Then Gosub P2LF
If Z=6 Then Gosub P2FF
If Z=7 Then Gosub P2LCF
If Z=8 Then Gosub P2SCF
On Menu On
Return
Rem move player 1 carrier
P1CM:
If CS1<=0 Then Bell : Return
If M1(1)=1 Then Bell : Return
Bob 64,CX1,CY1,64
MM=Amreg(0) : QX=MM
If CX1<(MM+20) or CX1>(MM+295) Then QX=CX1-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((CX1+104)-MM),CY1+42 To((CX1+128)-MM),CY1+66
TEST:
Repeat
Until Mouse Click<>0
X=((X Mouse-116)+MM) : Y=Y Mouse-54
If Y<0 Then Bell : Goto TEST
If Y>230 Then Bell : Goto TEST
A=Abs(X-CX1) : B=Abs(Y-CY1) : IMAGE=I Bob(37) : OO=36 : PP=11
If A>B and(X-CX1)<0 Then Bob 37,,,42
If A>B and(X-CX1)>0 Then Bob 37,,,43
If A<B and(Y-CY1)<0 Then Bob 37,,,45 : OO=14 : PP=37
If A<B and(Y-CY1)>0 Then Bob 37,,,44 : OO=14 : PP=37
XX=X : YY=Y
Gosub CHECKLAND
If Q=1 Then Bob 37,,,IMAGE : Goto TEST
X=XX+OO : Y=YY : Gosub CHECKLAND
If Q=1 Then Bob 37,,,IMAGE : Goto TEST
X=XX+OO : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 37,,,IMAGE : Goto TEST
X=XX : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 37,,,IMAGE : Goto TEST
X=XX : Y=YY
CX1=X : CY1=Y : Bob 37,CX1,CY1,
Set Zone 37,CX1,CY1 To CX1+OO,CY1+PP
Limit Mouse 115,50 To 443,295
Bob Off 64
M1(1)=1
Return
Rem player 1 destroyer move
P1DM:
For M=1 To 2
If DS1(M)<=0 Then Goto TILL
If M1(1+M)=1 Then Goto TILL
Bob 64,DX1(M),DY1(M),64
MM=Amreg(0) : QX=MM
If DX1(M)<(MM+20) or DX1(M)>(MM+295) Then QX=DX1(1)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((DX1(M)+100)-MM),DY1(M)+38 To((DX1(M)+132)-MM),DY1(M)+70
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto TILL
Repeat : Until Mouse Key=0
TEST1:
Repeat
Until Mouse Click<>0
X=((X Mouse-116)+MM) : Y=Y Mouse-54
If Y<0 Then Bell : Goto TEST1
If Y>230 Then Bell : Goto TEST1
A=Abs(X-DX1(M)) : B=Abs(Y-DY1(M)) : OO=17 : PP=17
IMAGE=I Bob(37+M)
If A>B and(X-DX1(M))<0 Then Bob 37+M,,,25 : OO=29 : PP=9
If A>B and(X-DX1(M))>0 Then Bob 37+M,,,26 : OO=29 : PP=9
If A<B and(Y-DY1(M))<0 Then Bob 37+M,,,27 : OO=10 : PP=30
If A<B and(Y-DY1(M))>0 Then Bob 37+M,,,28 : OO=10 : PP=30
If X-DX1(M)=-16 and Y-DY1(M)=-16 Then Bob 37+M,,,32
If X-DX1(M)=16 and Y-DY1(M)=-16 Then Bob 37+M,,,30
If X-DX1(M)=-16 and Y-DY1(M)=16 Then Bob 37+M,,,29
If X-DX1(M)=16 and Y-DY1(M)=16 Then Bob 37+M,,,31
XX=X : YY=Y
Gosub CHECKLAND
If Q=1 Then Bob 37+M,,,IMAGE : Goto TEST1
X=XX+OO : Y=YY : Gosub CHECKLAND
If Q=1 Then Bob 37+M,,,IMAGE : Goto TEST1
X=XX+OO : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 37+M,,,IMAGE : Goto TEST1
X=XX : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 37+M,,,IMAGE : Goto TEST1
X=XX : Y=YY
DX1(M)=X : DY1(M)=Y : Bob 37+M,DX1(M),DY1(M),
Set Zone 37+M,DX1(M),DY1(M) To DX1(M)+OO,DY1(M)+PP
M1(1+M)=1
TILL:
Next M
Limit Mouse 115,50 To 443,295
Bob Off 64
Return
P1PM:
For M=1 To 3
If PS1(M)<=0 Then Goto ILL
If M1(3+M)=1 Then Goto ILL
Bob 64,PX1(M),PY1(M),64
MM=Amreg(0) : QX=MM
If PX1(M)<(MM+25) or PX1(M)>(MM+290) Then QX=PX1(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((PX1(M)+96)-MM),PY1(M)+34 To((PX1(M)+136)-MM),PY1(M)+74
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto ILL
Repeat : Until Mouse Key=0
TEST3:
Repeat
Until Mouse Click<>0
X=((X Mouse-116)+MM) : Y=Y Mouse-54
If Y<0 Then Bell : Goto TEST3
If Y>230 Then Bell : Goto TEST3
A=Abs(X-PX1(M)) : B=Abs(Y-PY1(M))
OO=12 : PP=10 : IMAGE=I Bob(39+M)
If A>B and(X-PX1(M))<0 Then Bob 39+M,,,18 : OO=15 : PP=17
If A>B and(X-PX1(M))>0 Then Bob 39+M,,,17 : OO=15 : PP=17
If A<B and(Y-PY1(M))<0 Then Bob 39+M,,,20 : OO=8 : PP=13
If A<B and(Y-PY1(M))>0 Then Bob 39+M,,,19 : OO=8 : PP=13
If X-PX1(M)=-20 and Y-PY1(M)=-20 Then Bob 39+M,,,24
If X-PX1(M)=20 and Y-PY1(M)=-20 Then Bob 39+M,,,22
If X-PX1(M)=-20 and Y-PY1(M)=20 Then Bob 39+M,,,21
If X-PX1(M)=20 and Y-PY1(M)=20 Then Bob 39+M,,,23
XX=X : YY=Y
Gosub CHECKLAND
If Q=1 Then Bob 39+M,,,IMAGE : Goto TEST3
X=XX+OO : Y=YY : Gosub CHECKLAND
If Q=1 Then Bob 39+M,,,IMAGE : Goto TEST3
X=XX+OO : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 39+M,,,IMAGE : Goto TEST3
X=XX : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 39+M,,,IMAGE : Goto TEST3
X=XX : Y=YY
PX1(M)=X : PY1(M)=Y : Bob 39+M,PX1(M),PY1(M),
Set Zone 39+M,PX1(M),PY1(M) To PX1(M)+OO,PY1(M)+PP
M1(3+M)=1
ILL:
Next M
Limit Mouse 115,50 To 443,295
Bob Off 64
Return
Rem launch short range fighter
P1SL:
If CS1<=0 Then Bell : Return
MM=Amreg(0) : QX=MM
If CX1<(MM+20) or CX1>(MM+295) Then QX=CX1-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((CX1+106)-MM),CY1+40 To((CX1+146)-MM),CY1+75
If A1(1)=1 or A1(1)=-1 Then Goto P1SL1
Repeat
Until Mouse Key<>0
AX1(1)=((X Mouse-116)+MM) : AY1(1)=Y Mouse-54
Bob 1,AX1(1),AY1(1),1
Set Zone 1,AX1(1),AY1(1) To AX1(1)+8,AY1(1)+5
Limit Mouse 115,50 To 443,295
A1(1)=1
AF1(1)=10
Return
P1SL1:
If A1(2)=1 or A1(2)=-1 Then Goto P1SL2
Repeat
Until Mouse Key<>0
AX1(2)=((X Mouse-116)+MM) : AY1(2)=Y Mouse-54
Bob 2,AX1(2),AY1(2),1
Set Zone 2,AX1(2),AY1(2) To AX1(2)+8,AY1(2)+5
Limit Mouse 115,50 To 443,295
A1(2)=1
AF1(2)=10
Return
P1SL2:
If A1(3)=1 or A1(3)=-1 Then Goto P1SL3
Repeat
Until Mouse Key<>0
AX1(3)=((X Mouse-116)+MM) : AY1(3)=Y Mouse-54
Bob 3,AX1(3),AY1(3),1
Set Zone 3,AX1(3),AY1(3) To AX1(3)+8,AY1(3)+5
Limit Mouse 115,50 To 443,295
A1(3)=1
AF1(3)=10
Return
P1SL3:
If A1(4)=1 or A1(4)=-1 Then Goto P1SL4
Repeat
Until Mouse Key<>0
AX1(4)=((X Mouse-116)+MM) : AY1(4)=Y Mouse-54
Bob 4,AX1(4),AY1(4),1
Set Zone 4,AX1(4),AY1(4) To AX1(4)+8,AY1(4)+5
Limit Mouse 115,50 To 443,295
A1(4)=1
AF1(4)=10
Return
P1SL4:
If A1(5)=1 or A1(5)=-1 Then Bell : Limit Mouse 115,50 To 443,295 : Return
Repeat
Until Mouse Key<>0
AX1(5)=((X Mouse-116)+MM) : AY1(5)=Y Mouse-54
Bob 5,AX1(5),AY1(5),1
Set Zone 5,AX1(5),AY1(5) To AX1(5)+8,AY1(5)+5
Limit Mouse 115,50 To 443,295
A1(5)=1
AF1(5)=10
Return
P1LL:
If GS1<=0 Then Bell : Return
Screen Offset 0,0,0
Limit Mouse AAX1+110,AAY1+40 To AAX1+175,AAY1+75
If B1(1)=1 or BS1(1)<=0 Then Goto P1LL1
Repeat
Until Mouse Key<>0
BX1(1)=X Mouse-116 : BY1(1)=Y Mouse-54
Bob 6,BX1(1),BY1(1),10
Set Zone 6,BX1(1),BY1(1) To BX1(1)+10,BY1(1)+8
Limit Mouse 115,50 To 443,295
B1(1)=1
BF1(1)=20
Return
P1LL1:
If B1(2)=1 or BS1(2)<=0 Then Goto P1LL2
Repeat
Until Mouse Key<>0
BX1(2)=X Mouse-116 : BY1(2)=Y Mouse-54
Bob 7,BX1(2),BY1(2),10
Set Zone 7,BX1(2),BY1(2) To BX1(2)+10,BY1(2)+8
Limit Mouse 115,50 To 443,295
B1(2)=1
BF1(2)=20
Return
P1LL2:
If B1(3)=1 or BS1(3)<=0 Then Goto P1LL3
Repeat
Until Mouse Key<>0
BX1(3)=X Mouse-116 : BY1(3)=Y Mouse-54
Bob 8,BX1(3),BY1(3),10
Set Zone 8,BX1(3),BY1(3) To BX1(3)+10,BY1(3)+8
Limit Mouse 115,50 To 443,295
B1(3)=1 : BF1(3)=20
Return
P1LL3:
If B1(4)=1 or BS1(4)<=0 Then Goto P1LL4
Repeat
Until Mouse Key<>0
BX1(4)=X Mouse-116 : BY1(4)=Y Mouse-54
Bob 9,BX1(4),BY1(4),10
Set Zone 9,BX1(4),BY1(4) To BX1(4)+10,BY1(4)+8
Limit Mouse 115,50 To 443,295
B1(4)=1 : BF1(4)=20
Return
P1LL4:
If B1(5)=1 or BS1(5)<=0 Then Goto P1LL5
Repeat
Until Mouse Key<>0
BX1(5)=X Mouse-116 : BY1(5)=Y Mouse-54
Bob 10,BX1(5),BY1(5),10
Set Zone 10,BX1(5),BY1(5) To BX1(5)+10,BY1(5)+8
Limit Mouse 115,50 To 443,295
B1(5)=1 : BF1(5)=20
Return
P1LL5:
If B1(6)=1 or BS1(6)<=0 Then Goto P1LL6
Repeat
Until Mouse Key<>0
BX1(6)=X Mouse-116 : BY1(6)=Y Mouse-54
Bob 11,BX1(6),BY1(6),10
Set Zone 11,BX1(6),BY1(6) To BX1(6)+10,BY1(6)+8
Limit Mouse 115,50 To 443,295
B1(6)=1 : BF1(6)=20
Return
P1LL6:
If B1(7)=1 or BS1(7)<=0 Then Goto P1LL7
Repeat
Until Mouse Key<>0
BX1(7)=X Mouse-116 : BY1(7)=Y Mouse-54
Bob 12,BX1(7),BY1(7),10
Set Zone 12,BX1(7),BY1(7) To BX1(7)+10,BY1(7)+8
Limit Mouse 115,50 To 443,295
B1(7)=1 : BF1(7)=20
Return
P1LL7:
If B1(8)=1 or BS1(8)<=0 Then Bell : Limit Mouse 115,50 To 443,295 : Return
Repeat
Until Mouse Key<>0
BX1(8)=X Mouse-116 : BY1(8)=Y Mouse-54
Bob 13,BX1(8),BY1(8),10
Set Zone 13,BX1(8),BY1(8) To BX1(8)+10,BY1(8)+8
Limit Mouse 115,50 To 443,295
B1(8)=1 : BF1(8)=20
Return
Rem move player 1 short fighter
P1SM:
For M=1 To 5
If A1(M)<>1 Then Goto ILL2
If M1(6+M)=1 Then Goto ILL2
Bob 64,AX1(M),AY1(M),64
MM=Amreg(0) : QX=MM
If AX1(M)<(MM+25) or AX1(M)>(MM+290) Then QX=AX1(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((AX1(M)+96)-MM),AY1(M)+34 To((AX1(M)+136)-MM),AY1(M)+74
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto ILL2
Repeat : Until Mouse Key=0
TEST5:
Repeat
Until Mouse Click<>0
X=((X Mouse-116)+MM) : Y=Y Mouse-54
If Y<0 Then Bell : Goto TEST5
If Y>240 Then Bell : Goto TEST5
A=Abs(X-AX1(M)) : B=Abs(Y-AY1(M))
If A>B and(X-AX1(M))<0 Then Bob 0+M,,,2
If A>B and(X-AX1(M))>0 Then Bob 0+M,,,1
If A<B and(Y-AY1(M))<0 Then Bob 0+M,,,3
If A<B and(Y-AY1(M))>0 Then Bob 0+M,,,4
If X-AX1(M)=-20 and Y-AY1(M)=-20 Then Bob 0+M,,,6
If X-AX1(M)=20 and Y-AY1(M)=-20 Then Bob 0+M,,,5
If X-AX1(M)=-20 and Y-AY1(M)=20 Then Bob 0+M,,,8
If X-AX1(M)=20 and Y-AY1(M)=20 Then Bob 0+M,,,7
AX1(M)=X : AY1(M)=Y : Bob 0+M,AX1(M),AY1(M),
Set Zone 0+M,AX1(M),AY1(M) To AX1(M)+8,AY1(M)+5
M1(6+M)=1
ILL2:
Next M
Limit Mouse 115,50 To 443,295
Bob Off 64
Return
Rem move player 1 long fighters
P1LM:
For M=1 To 8
If B1(M)<>1 or BS1(M)<=0 Then Goto ILL3
If M1(11+M)=1 Then Goto ILL3
Bob 64,BX1(M),BY1(M),64
MM=Amreg(0) : QX=MM
If BX1(M)<(MM+30) or BX1(M)>(MM+285) Then QX=BX1(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((BX1(M)+92)-MM),BY1(M)+30 To((BX1(M)+140)-MM),BY1(M)+78
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto ILL3
Repeat : Until Mouse Key=0
TEST6:
Repeat
Until Mouse Click<>0
X=((X Mouse-116)+MM) : Y=Y Mouse-54
If Y<0 Then Bell : Goto TEST6
If Y>240 Then Bell : Goto TEST6
A=Abs(X-BX1(M)) : B=Abs(Y-BY1(M))
If A>B and(X-BX1(M))<0 Then Bob 5+M,,,12
If A>B and(X-BX1(M))>0 Then Bob 5+M,,,10
If A<B and(Y-BY1(M))<0 Then Bob 5+M,,,9
If A<B and(Y-BY1(M))>0 Then Bob 5+M,,,11
If X-BX1(M)=-24 and Y-BY1(M)=-24 Then Bob 5+M,,,15
If X-BX1(M)=24 and Y-BY1(M)=-24 Then Bob 5+M,,,16
If X-BX1(M)=-24 and Y-BY1(M)=24 Then Bob 5+M,,,13
If X-BX1(M)=24 and Y-BY1(M)=24 Then Bob 5+M,,,14
BX1(M)=X : BY1(M)=Y : Bob 5+M,BX1(M),BY1(M),
Set Zone 5+M,BX1(M),BY1(M) To BX1(M)+10,BY1(M)+8
M1(11+M)=1
ILL3:
Next M
Limit Mouse 115,50 To 443,295
Bob Off 64
Return
Rem fire routine
PFIRE1:
X=X-Amreg(0)
PFIRE11:
Repeat
Until Mouse Key=0
Sprite 1,X,Y,48
For A=X To X+R
Sprite 1,A,Y,
For T=1 To 100 : Next T
If Mouse Key<>0 Then XX=A+2 : Sprite Off : Goto PFIRE2
Next A
For A=X+R To X Step -1
Sprite 1,A,Y,
For T=1 To 100 : Next T
If Mouse Key<>0 Then XX=A+2 : Sprite Off : Goto PFIRE2
Next A
Goto PFIRE11
Return
PFIRE2:
Repeat
Until Mouse Key=0
PFIRE3:
Sprite 1,XX-8,Y,49
For A=(Y-(R/2)) To(Y+(R/2))
Sprite 1,XX-8,A+7,
For T=1 To 100 : Next T
If Mouse Key<>0 Then YY=A+7 : Sprite 1,XX,YY,55 : Shoot : Return
Next A
For A=(Y+(R/2)) To(Y-(R/2)) Step -1
Sprite 1,XX-8,A+7,
For T=1 To 100 : Next T
If Mouse Key<>0 Then YY=A+7 : Sprite 1,XX,YY,55 : Shoot : Return
Next A
Goto PFIRE3
P1FF:
Screen Offset 0,0,0
For M=1 To 4
If M1(19+M)=1 Then Goto P1FE
If FS1(M)<=0 Then Goto P1FE
Bob 64,FX1(M),FY1(M),64
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P1FE
Repeat : Until Mouse Key=0
X=FX1(M)+124 : Y=FY1(M)+47 : R=40
M1(19+M)=1
Repeat
Until Mouse Key=0
STR=1
Gosub PFIRE1 : Gosub P1FCHIT
P1FE:
Next M
Bob Off 64
Return
P1LCF:
Screen Offset 0,0,0
For M=1 To 2
If M1(23+M)=1 Then Goto P1LFE
If LS1(M)<=0 Then Goto P1LFE
Bob 64,LX1(M),LY1(M),64
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P1LFE
Repeat : Until Mouse Key=0
X=LX1(M)+130 : Y=LY1(M)+47 : R=60
M1(23+M)=1
Repeat
Until Mouse Key=0
STR=2
Gosub PFIRE1 : Gosub P1FCHIT
P1LFE:
Next M
Bob Off 64
Return
P1SCF:
Screen Offset 0,0,0
For M=1 To 2
If M1(25+M)=1 Then Goto P1LSE
If SS1(M)<=0 Then Goto P1LSE
Bob 64,SX1(M),SY1(M),64
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P1LSE
Repeat : Until Mouse Key=0
X=SX1(M)+80 : Y=SY1(M)+47 : R=80
M1(25+M)=1
Repeat
Until Mouse Key=0
STR=2
Gosub PFIRE1 : Gosub P1FCHIT
P1LSE:
Next M
Bob Off 64
Return
P1PF:
For M=1 To 3
If M1(3+M)=1 Then Goto P1PFE
If PS1(M)<=0 Then Goto P1PFE
Bob 64,PX1(M),PY1(M),64
MM=Amreg(0) : QX=MM
If PX1(M)<(MM+20) or PX1(M)>(MM+295) Then QX=PX1(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P1PFE
Repeat : Until Mouse Key=0
M1(3+M)=1
If I Bob(39+M)=17 Then X=PX1(M)+124 : Y=PY1(M)+47
If I Bob(39+M)=18 Then X=PX1(M)+66 : Y=PY1(M)+47
If I Bob(39+M)=20 Then X=PX1(M)+93 : Y=PY1(M)+15
If I Bob(39+M)=19 Then X=PX1(M)+93 : Y=PY1(M)+80
If I Bob(39+M)=24 Then X=PX1(M)+80 : Y=PY1(M)+35
If I Bob(39+M)=21 Then X=PX1(M)+80 : Y=PY1(M)+74
If I Bob(39+M)=22 Then X=PX1(M)+110 : Y=PY1(M)+35
If I Bob(39+M)=23 Then X=PX1(M)+110 : Y=PY1(M)+74
R=50 : STR=1
Gosub PFIRE1 : Gosub P1FCHIT
P1PFE:
Next M
Bob Off 64
Return
P1LF:
For M=1 To 8
If B1(M)<>1 or BS1(M)<=0 Then Goto P1LFEN
If M1(11+M)=1 Then Goto P1LFEN
Bob 64,BX1(M),BY1(M),64
MM=Amreg(0) : QX=MM
If BX1(M)<(MM+20) or BX1(M)>(MM+295) Then QX=BX1(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P1LFEN
Repeat : Until Mouse Key=0
M1(11+M)=1
If I Bob(5+M)=10 Then X=BX1(M)+124 : Y=BY1(M)+47
If I Bob(5+M)=12 Then X=BX1(M)+66 : Y=BY1(M)+47
If I Bob(5+M)=9 Then X=BX1(M)+93 : Y=BY1(M)+15
If I Bob(5+M)=11 Then X=BX1(M)+93 : Y=BY1(M)+80
If I Bob(5+M)=15 Then X=BX1(M)+80 : Y=BY1(M)+35
If I Bob(5+M)=13 Then X=BX1(M)+80 : Y=BY1(M)+74
If I Bob(5+M)=16 Then X=BX1(M)+110 : Y=BY1(M)+35
If I Bob(5+M)=14 Then X=BX1(M)+110 : Y=BY1(M)+74
R=50 : STR=1
Gosub PFIRE1 : Gosub P1FCHIT
P1LFEN:
Next M
Bob Off 64
Return
P1SF:
For M=1 To 5
If A1(M)<>1 Then Goto P1SFEN
If M1(6+M)=1 Then Goto P1SFEN
Bob 64,AX1(M),AY1(M),64
MM=Amreg(0) : QX=MM
If AX1(M)<(MM+20) or AX1(M)>(MM+295) Then QX=AX1(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P1SFEN
Repeat : Until Mouse Key=0
M1(6+M)=1
If I Bob(M)=1 Then X=AX1(M)+120 : Y=AY1(M)+47
If I Bob(M)=2 Then X=AX1(M)+76 : Y=AY1(M)+47
If I Bob(M)=3 Then X=AX1(M)+93 : Y=AY1(M)+25
If I Bob(M)=4 Then X=AX1(M)+93 : Y=AY1(M)+70
If I Bob(M)=6 Then X=AX1(M)+80 : Y=AY1(M)+35
If I Bob(M)=8 Then X=AX1(M)+80 : Y=AY1(M)+74
If I Bob(M)=5 Then X=AX1(M)+110 : Y=AY1(M)+35
If I Bob(M)=7 Then X=AX1(M)+110 : Y=AY1(M)+64
R=40 : STR=1
Gosub PFIRE1 : Gosub P1FCHIT
P1SFEN:
Next M
Bob Off 64
Return
P1CF:
If CS1<=0 Then Bell : Return
If M1(1)=1 Then Bell : Return
Bob 64,CX1,CY1,64
MM=Amreg(0) : QX=MM
If CX1<(MM+20) or CX1>(MM+295) Then QX=CX1-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
M1(1)=1
If I Bob(37)=42 or I Bob(37)=43 Then Goto P1CHF
If I Bob(37)=44 or I Bob(37)=45 Then Goto P1CVF
Return
P1CHF:
Bob 64,CX1-20,CY1,
STR=2
If I Bob(37)=42 Then STR=3
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX1+46 : Y=CY1+52 : R=70 : Gosub PFIRE1 : Gosub P1FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX1+15,CY1-15,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX1+110 : Y=CY1+20 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX1+45,CY1,
STR=2
If I Bob(37)=43 Then STR=3
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX1+145 : Y=CY1+50 : R=70 : Gosub PFIRE1 : Gosub P1FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX1+15,CY1+20,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX1+110 : Y=CY1+75 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Goto P1CHF
P1CVF:
Bob 64,CX1-10,CY1+15,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX1+66 : Y=CY1+60 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX1+2,CY1-15,
STR=2
If I Bob(37)=45 Then STR=3
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX1+85 : Y=CY1+10 : R=70 : Gosub PFIRE1 : Gosub P1FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX1+20,CY1+15,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX1+120 : Y=CY1+60 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX1+2,CY1+40,
STR=2
If I Bob(37)=44 Then STR=3
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX1+80 : Y=CY1+110 : R=70 : Gosub PFIRE1 : Gosub P1FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Goto P1CVF
Return
P1DF:
For M=1 To 2
If DS1(M)<=0 Then Goto P1DFE
If M1(1+M)=1 Then Goto P1DFE
Bob 64,DX1(M),DY1(M),64
MM=Amreg(0) : QX=MM
If DX1(M)<(MM+20) or DX1(M)>(MM+295) Then QX=DX1(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P1DFE
Repeat : Until Mouse Key=0
M1(1+M)=1
If I Bob(37+M)=25 or I Bob(37+M)=26 Then Gosub P1DHF
If I Bob(37+M)=27 or I Bob(37+M)=28 Then Gosub P1DVF
If I Bob(37+M)=29 or I Bob(37+M)=30 Then Gosub P1DRF
If I Bob(37+M)=31 or I Bob(37+M)=32 Then Gosub P1DLF
P1DFE:
Next M
Bob Off 64
Return
P1DHF:
Bob 64,DX1(M)-10,DY1(M),
STR=1
If I Bob(37+M)=25 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+65 : Y=DY1(M)+46 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)+10,DY1(M)-10,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+102 : Y=DY1(M)+16 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)+35,DY1(M),
STR=1
If I Bob(37+M)=26 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+138 : Y=DY1(M)+46 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)+10,DY1(M)+12,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+102 : Y=DY1(M)+75 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Goto P1DHF
P1DVF:
Bob 64,DX1(M)-10,DY1(M)+10,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+66 : Y=DY1(M)+55 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)+2,DY1(M)-10,
STR=1
If I Bob(37+M)=27 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+90 : Y=DY1(M)+15 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)+12,DY1(M)+10,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+120 : Y=DY1(M)+60 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)+2,DY1(M)+30,
STR=1
If I Bob(37+M)=28 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+90 : Y=DY1(M)+100 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Goto P1DVF
Return
P1DRF:
Bob 64,DX1(M)-2,DY1(M),
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+75 : Y=DY1(M)+35 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)+22,DY1(M)-10,
STR=1
If I Bob(37+M)=30 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+115 : Y=DY1(M)+25 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)+14,DY1(M)+12,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+110 : Y=DY1(M)+65 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)-8,DY1(M)+20,
STR=1
If I Bob(37+M)=29 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+80 : Y=DY1(M)+80 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Goto P1DRF
Return
P1DLF:
Bob 64,DX1(M),DY1(M)+12,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+85 : Y=DY1(M)+60 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)-10,DY1(M)-10,
STR=1
If I Bob(37+M)=32 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+80 : Y=DY1(M)+25 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)+19,DY1(M)+2,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+110 : Y=DY1(M)+40 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX1(M)+22,DY1(M)+20,
STR=1
If I Bob(37+M)=31 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX1(M)+115 : Y=DY1(M)+80 : R=50 : Gosub PFIRE1 : Gosub P1FCHIT : Return
Repeat
Until Mouse Key=0
Goto P1DLF
Return
Rem move player 2 carrier
P2CM:
If CS2<=0 Then Bell : Return
If M2(1)=1 Then Bell : Return
Bob 64,CX2,CY2,64
MM=Amreg(0) : QX=MM
If CX2<(MM+20) or CX2>(MM+295) Then QX=CX2-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((CX2+104)-MM),CY2+42 To((CX2+128)-MM),CY2+66
P2TEST:
Repeat
Until Mouse Click<>0
X=((X Mouse-116)+MM) : Y=Y Mouse-54
If Y<0 Then Bell : Goto TEST
If Y>230 Then Bell : Goto TEST
A=Abs(X-CX2) : B=Abs(Y-CY2) : OO=36 : PP=11 : IMAGE=I Bob(53)
If A>B and(X-CX2)<0 Then Bob 53,,,42
If A>B and(X-CX2)>0 Then Bob 53,,,43
If A<B and(Y-CY2)<0 Then Bob 53,,,45 : OO=14 : PP=37
If A<B and(Y-CY2)>0 Then Bob 53,,,44 : OO=14 : PP=37
XX=X : YY=Y
Gosub CHECKLAND
If Q=1 Then Bob 53,,,IMAGE : Goto P2TEST
X=XX+OO : Y=YY : Gosub CHECKLAND
If Q=1 Then Bob 53,,,IMAGE : Goto P2TEST
X=XX+OO : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 53,,,IMAGE : Goto P2TEST
X=XX : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 53,,,IMAGE : Goto P2TEST
X=XX : Y=YY
CX2=X : CY2=Y : Bob 53,CX2,CY2,
Set Zone 53,CX2,CY2 To CX2+OO,CY2+PP
Limit Mouse 115,50 To 443,295
Bob Off 64
M2(1)=1
Return
Rem player 2 destroyer move
P2DM:
For M=1 To 2
If DS2(M)<=0 Then Goto P2TILL
If M2(1+M)=1 Then Goto P2TILL
Bob 64,DX2(M),DY2(M),64
MM=Amreg(0) : QX=MM
If DX2(M)<(MM+25) or DX2(M)>(MM+290) Then QX=DX2(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((DX2(M)+100)-MM),DY2(M)+38 To((DX2(M)+132)-MM),DY2(M)+70
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P2TILL
Repeat : Until Mouse Key=0
P2TEST1:
Repeat
Until Mouse Click<>0
X=((X Mouse-116)+MM) : Y=Y Mouse-54
If Y<0 Then Bell : Goto P2TEST1
If Y>230 Then Bell : Goto P2TEST1
A=Abs(X-DX2(M)) : B=Abs(Y-DY2(M)) : OO=17 : PP=17 : IMAGE=I Bob(53+M)
If A>B and(X-DX2(M))<0 Then Bob 53+M,,,25 : OO=15 : PP=7
If A>B and(X-DX2(M))>0 Then Bob 53+M,,,26 : OO=15 : PP=7
If A<B and(Y-DY2(M))<0 Then Bob 53+M,,,27 : OO=8 : PP=13
If A<B and(Y-DY2(M))>0 Then Bob 53+M,,,28 : OO=8 : PP=13
If X-DX2(M)=-16 and Y-DY2(M)=-16 Then Bob 53+M,,,32
If X-DX2(M)=16 and Y-DY2(M)=-16 Then Bob 53+M,,,30
If X-DX2(M)=-16 and Y-DY2(M)=16 Then Bob 53+M,,,29
If X-DX2(M)=16 and Y-DY2(M)=16 Then Bob 53+M,,,31
XX=X : YY=Y
Gosub CHECKLAND
If Q=1 Then Bob 53+M,,,IMAGE : Goto P2TEST1
X=XX+OO : Y=YY : Gosub CHECKLAND
If Q=1 Then Bob 53+M,,,IMAGE : Goto P2TEST1
X=XX+OO : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 53+M,,,IMAGE : Goto P2TEST1
X=XX : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 53+M,,,IMAGE : Goto P2TEST1
X=XX : Y=YY
DX2(M)=X : DY2(M)=Y : Bob 53+M,DX2(M),DY2(M),
Set Zone 53+M,DX2(M),DY2(M) To DX2(M)+OO,DY2(M)+PP
M2(1+M)=1
P2TILL:
Next M
Limit Mouse 115,50 To 443,295
Bob Off 64
Return
Rem player 2 patrol move
P2PM:
For M=1 To 3
If PS2(M)<=0 Then Goto P2ILL
If M2(3+M)=1 Then Goto P2ILL
Bob 64,PX2(M),PY2(M),64
MM=Amreg(0) : QX=MM
If PX2(M)<(MM+25) or PX2(M)>(MM+290) Then QX=PX2(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((PX2(M)+96)-MM),PY2(M)+34 To((PX2(M)+136)-MM),PY2(M)+74
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P2ILL
Repeat : Until Mouse Key=0
P2TEST3:
Repeat
Until Mouse Click<>0
X=((X Mouse-116)+MM) : Y=Y Mouse-54
If Y<0 Then Bell : Goto P2TEST3
If Y>230 Then Bell : Goto P2TEST3
A=Abs(X-PX1(M)) : B=Abs(Y-PY1(M))
OO=12 : PP=10 : IMAGE=I Bob(55+M)
If A>B and(X-PX2(M))<0 Then Bob 55+M,,,18 : OO=15 : PP=7
If A>B and(X-PX2(M))>0 Then Bob 55+M,,,17 : OO=15 : PP=7
If A<B and(Y-PY2(M))<0 Then Bob 55+M,,,20 : OO=8 : PP=14
If A<B and(Y-PY2(M))>0 Then Bob 55+M,,,19 : OO=8 : PP=14
If X-PX2(M)=-20 and Y-PY2(M)=-20 Then Bob 55+M,,,24
If X-PX2(M)=20 and Y-PY2(M)=-20 Then Bob 55+M,,,22
If X-PX2(M)=-20 and Y-PY2(M)=20 Then Bob 55+M,,,21
If X-PX2(M)=20 and Y-PY2(M)=20 Then Bob 55+M,,,23
XX=X : YY=Y
Gosub CHECKLAND
If Q=1 Then Bob 55+M,,,IMAGE : Goto P2TEST3
X=XX+OO : Y=YY : Gosub CHECKLAND
If Q=1 Then Bob 55+M,,,IMAGE : Goto P2TEST3
X=XX+OO : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 55+M,,,IMAGE : Goto P2TEST3
X=XX : Y=YY+PP : Gosub CHECKLAND
If Q=1 Then Bob 55+M,,,IMAGE : Goto P2TEST3
X=XX : Y=YY
PX2(M)=X : PY2(M)=Y : Bob 55+M,PX2(M),PY2(M),
Set Zone 55+M,PX2(M),PY2(M) To PX2(M)+OO,PY2(M)+PP
M2(3+M)=1
P2ILL:
Next M
Limit Mouse 115,50 To 443,295
Bob Off 64
Return
Rem launch short range fighter player 2
P2SL:
If CS2<=0 Then Bell : Return
MM=Amreg(0) : QX=MM
If CX2<(MM+20) or CX2>(MM+295) Then QX=CX2-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((CX2+106)-MM),CY2+40 To((CX2+146)-MM),CY2+75
If A2(1)=1 or A2(1)=-1 Then Goto P2SL1
Repeat
Until Mouse Key<>0
AX2(1)=((X Mouse-116)+MM) : AY2(1)=Y Mouse-54
Bob 14,AX2(1),AY2(1),2
Set Zone 14,AX2(1),AY2(1) To AX2(1)+8,AY2(1)+5
Limit Mouse 115,50 To 443,295
A2(1)=1 : AF2(1)=10
Return
P2SL1:
If A2(2)=1 or A2(2)=-1 Then Goto P2SL2
Repeat
Until Mouse Key<>0
AX2(2)=((X Mouse-116)+MM) : AY2(2)=Y Mouse-54
Bob 15,AX2(2),AY2(2),2
Set Zone 15,AX2(2),AY2(2) To AX2(2)+8,AY2(2)+5
Limit Mouse 115,50 To 443,295
A2(2)=1 : AF2(2)=10
Return
P2SL2:
If A2(3)=1 or A2(3)=-1 Then Goto P2SL3
Repeat
Until Mouse Key<>0
AX2(3)=((X Mouse-116)+MM) : AY2(3)=Y Mouse-54
Bob 16,AX2(3),AY2(3),2
Set Zone 16,AX2(3),AY2(3) To AX2(3)+8,AY2(3)+5
Limit Mouse 115,50 To 443,295
A2(3)=1 : AF2(3)=10
Return
P2SL3:
If A2(4)=1 or A2(4)=-1 Then Goto P2SL4
Repeat
Until Mouse Key<>0
AX2(4)=((X Mouse-116)+MM) : AY2(4)=Y Mouse-54
Bob 17,AX2(4),AY2(4),2
Set Zone 17,AX2(4),AY2(4) To AX2(4)+8,AY2(4)+5
Limit Mouse 115,50 To 443,295
A2(4)=1 : AF2(4)=10
Return
P2SL4:
If A2(5)=1 or A2(5)=-1 Then Bell : Limit Mouse 115,50 To 443,295 : Return
Repeat
Until Mouse Key<>0
AX2(5)=((X Mouse-116)+MM) : AY2(5)=Y Mouse-54
Bob 18,AX2(5),AY2(5),2
Set Zone 18,AX2(5),AY2(5) To AX2(5)+8,AY2(5)+5
Limit Mouse 115,50 To 443,295
A2(5)=1 : AF2(5)=10
Return
P2LL:
If GS2<=0 Then Bell : Return
Screen Offset 0,625,0
MM=625
Limit Mouse((AAX2+90)-MM),AAY2+40 To((AAX2+160)-MM),AAY2+75
If B2(1)=1 or BS2(1)<=0 Then Goto P2LL1
Repeat
Until Mouse Key<>0
BX2(1)=((X Mouse-116)+MM) : BY2(1)=Y Mouse-54
Bob 19,BX2(1),BY2(1),12
Set Zone 19,BX2(1),BY2(1) To BX2(1)+10,BY2(1)+8
Limit Mouse 115,50 To 443,295
B2(1)=1 : BF2(1)=20
Return
P2LL1:
If B2(2)=1 or BS2(2)<=0 Then Goto P2LL2
Repeat
Until Mouse Key<>0
BX2(2)=((X Mouse-116)+MM) : BY2(2)=Y Mouse-54
Bob 20,BX2(2),BY2(2),12
Set Zone 20,BX2(2),BY2(2) To BX2(2)+10,BY2(2)+8
Limit Mouse 115,50 To 443,295
B2(2)=1 : BF2(2)=20
Return
P2LL2:
If B2(3)=1 or BS2(3)<=0 Then Goto P2LL3
Repeat
Until Mouse Key<>0
BX2(3)=((X Mouse-116)+MM) : BY2(3)=Y Mouse-54
Bob 21,BX2(3),BY2(3),12
Set Zone 21,BX2(3),BY2(3) To BX2(3)+10,BY2(3)+8
Limit Mouse 115,50 To 443,295
B2(3)=1 : BF2(3)=20
Return
P2LL3:
If B2(4)=1 or BS2(4)<=0 Then Goto P2LL4
Repeat
Until Mouse Key<>0
BX2(4)=((X Mouse-116)+MM) : BY2(4)=Y Mouse-54
Bob 22,BX2(4),BY2(4),12
Set Zone 22,BX2(4),BY2(4) To BX2(4)+10,BY2(4)+8
Limit Mouse 115,50 To 443,295
B2(4)=1 : BF2(4)=20
Return
P2LL4:
If B2(5)=1 or BS2(5)<=0 Then Goto P2LL5
Repeat
Until Mouse Key<>0
BX2(5)=((X Mouse-116)+MM) : BY2(5)=Y Mouse-54
Bob 23,BX2(5),BY2(5),12
Set Zone 23,BX2(5),BY2(5) To BX2(5)+10,BY2(5)+8
Limit Mouse 115,50 To 443,295
B2(5)=1 : BF2(5)=20
Return
P2LL5:
If B2(6)=1 or BS2(6)<=0 Then Goto P2LL6
Repeat
Until Mouse Key<>0
BX2(6)=((X Mouse-116)+MM) : BY2(6)=Y Mouse-54
Bob 24,BX2(6),BY2(6),12
Set Zone 24,BX2(6),BY2(6) To BX2(6)+10,BY2(6)+8
Limit Mouse 115,50 To 443,295
B2(6)=1 : BF2(6)=20
Return
P2LL6:
If B2(7)=1 or BS2(7)<=0 Then Goto P2LL7
Repeat
Until Mouse Key<>0
BX2(7)=((X Mouse-116)+MM) : BY2(7)=Y Mouse-54
Bob 25,BX2(7),BY2(7),12
Set Zone 25,BX2(7),BY2(7) To BX2(7)+10,BY2(7)+8
Limit Mouse 115,50 To 443,295
B2(7)=1 : BF2(7)=20
Return
P2LL7:
If B2(8)=1 or BS2(8)<=0 Then Bell : Limit Mouse 115,50 To 443,295 : Return
Repeat
Until Mouse Key<>0
BX2(8)=((X Mouse-116)+MM) : BY2(8)=Y Mouse-54
Bob 26,BX2(8),BY2(8),12
Set Zone 26,BX2(8),BY2(8) To BX2(8)+10,BY2(8)+8
Limit Mouse 115,50 To 443,295
B2(8)=1 : BF2(8)=20
Return
Rem move player 2 short fighter
P2SM:
For M=1 To 5
If A2(M)<>1 Then Goto P2ILL2
If M2(6+M)=1 Then Goto P2ILL2
Bob 64,AX2(M),AY2(M),64
MM=Amreg(0) : QX=MM
If AX2(M)<(MM+25) or AX2(M)>(MM+290) Then QX=AX2(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((AX2(M)+96)-MM),AY2(M)+34 To((AX2(M)+136)-MM),AY2(M)+74
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P2ILL2
Repeat : Until Mouse Key=0
P2TEST5:
Repeat
Until Mouse Click<>0
X=((X Mouse-116)+MM) : Y=Y Mouse-54
If Y<0 Then Bell : Goto P2TEST5
If Y>240 Then Bell : Goto P2TEST5
A=Abs(X-AX2(M)) : B=Abs(Y-AY2(M))
If A>B and(X-AX2(M))<0 Then Bob 13+M,,,2
If A>B and(X-AX2(M))>0 Then Bob 13+M,,,1
If A<B and(Y-AY2(M))<0 Then Bob 13+M,,,3
If A<B and(Y-AY2(M))>0 Then Bob 13+M,,,4
If X-AX2(M)=-20 and Y-AY2(M)=-20 Then Bob 13+M,,,6
If X-AX2(M)=20 and Y-AY2(M)=-20 Then Bob 13+M,,,5
If X-AX2(M)=-20 and Y-AY2(M)=20 Then Bob 13+M,,,8
If X-AX2(M)=20 and Y-AY2(M)=20 Then Bob 13+M,,,7
AX2(M)=X : AY2(M)=Y : Bob 13+M,AX2(M),AY2(M),
Set Zone 13+M,AX2(M),AY2(M) To AX2(M)+8,AY2(M)+5
M2(6+M)=1
P2ILL2:
Next M
Limit Mouse 115,50 To 443,295
Bob Off 64
Return
Rem move player 2 long fighters
P2LM:
For M=1 To 8
If B2(M)<>1 or BS2(M)<=0 Then Goto P2ILL3
If M2(11+M)=1 Then Goto P2ILL3
Bob 64,BX2(M),BY2(M),64
MM=Amreg(0) : QX=MM
If BX2(M)<(MM+30) or BX2(M)>(MM+285) Then QX=BX2(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Limit Mouse((BX2(M)+92)-MM),BY2(M)+30 To((BX2(M)+140)-MM),BY2(M)+78
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P2ILL3
Repeat : Until Mouse Key=0
P2TEST6:
Repeat
Until Mouse Click<>0
X=((X Mouse-116)+MM) : Y=Y Mouse-54
If Y<0 Then Bell : Goto P2TEST6
If Y>240 Then Bell : Goto P2TEST6
A=Abs(X-BX2(M)) : B=Abs(Y-BY2(M))
If A>B and(X-BX2(M))<0 Then Bob 18+M,,,12
If A>B and(X-BX2(M))>0 Then Bob 18+M,,,10
If A<B and(Y-BY2(M))<0 Then Bob 18+M,,,9
If A<B and(Y-BY2(M))>0 Then Bob 18+M,,,11
If X-BX2(M)=-24 and Y-BY2(M)=-24 Then Bob 18+M,,,15
If X-BX2(M)=24 and Y-BY2(M)=-24 Then Bob 18+M,,,16
If X-BX2(M)=-24 and Y-BY2(M)=24 Then Bob 18+M,,,13
If X-BX2(M)=24 and Y-BY2(M)=24 Then Bob 18+M,,,14
BX2(M)=X : BY2(M)=Y : Bob 18+M,BX2(M),BY2(M),
Set Zone 18+M,BX2(M),BY2(M) To BX2(M)+10,BY2(M)+8
M2(11+M)=1
P2ILL3:
Next M
Limit Mouse 115,50 To 443,295
Bob Off 64
Return
P2FF:
Screen Offset 0,625,0
For M=1 To 4
If M2(19+M)=1 Then Goto P2FE
If FS2(M)<=0 Then Goto P2FE
Bob 64,FX2(M),FY2(M),64
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P2FE
Repeat : Until Mouse Key=0
X=FX2(M)+74 : Y=FY2(M)+47 : R=40
M2(19+M)=1
Repeat
Until Mouse Key=0
STR=1
Gosub PFIRE1 : Gosub P2FCHIT
P2FE:
Next M
Bob Off 64
Return
P2LCF:
Screen Offset 0,625,0
For M=1 To 2
If M2(23+M)=1 Then Goto P2LFE
If LS2(M)<=0 Then Goto P2LFE
Bob 64,LX2(M),LY2(M),64
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P2LFE
Repeat : Until Mouse Key=0
X=LX2(M)+54 : Y=LY2(M)+47 : R=60
M2(23+M)=1
Repeat
Until Mouse Key=0
STR=2
Gosub PFIRE1 : Gosub P2FCHIT
P2LFE:
Next M
Bob Off 64
Return
P2SCF:
Screen Offset 0,625,0
For M=1 To 2
If M2(25+M)=1 Then Goto P2LSE
If SS2(M)<=0 Then Goto P2LSE
Bob 64,SX2(M),SY2(M),64
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P2LSE
Repeat : Until Mouse Key=0
X=SX2(M)+70 : Y=SY2(M)+47 : R=80
M2(25+M)=1
Repeat
Until Mouse Key=0
STR=2
Gosub PFIRE1 : Gosub P2FCHIT
P2LSE:
Next M
Bob Off 64
Return
P2PF:
For M=1 To 3
If M2(3+M)=1 Then Goto P2PFE
If PS2(M)<=0 Then Goto P2PFE
Bob 64,PX2(M),PY2(M),64
MM=Amreg(0) : QX=MM
If PX2(M)<(MM+20) or PX2(M)>(MM+295) Then QX=PX2(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P2PFE
Repeat : Until Mouse Key=0
M2(3+M)=1
If I Bob(55+M)=17 Then X=PX2(M)+124 : Y=PY2(M)+47
If I Bob(55+M)=18 Then X=PX2(M)+66 : Y=PY2(M)+47
If I Bob(55+M)=20 Then X=PX2(M)+93 : Y=PY2(M)+15
If I Bob(55+M)=19 Then X=PX2(M)+93 : Y=PY2(M)+80
If I Bob(55+M)=24 Then X=PX2(M)+80 : Y=PY2(M)+35
If I Bob(55+M)=21 Then X=PX2(M)+80 : Y=PY2(M)+74
If I Bob(55+M)=22 Then X=PX2(M)+110 : Y=PY2(M)+35
If I Bob(55+M)=23 Then X=PX2(M)+110 : Y=PY2(M)+74
R=50 : STR=1
Gosub PFIRE1 : Gosub P2FCHIT
P2PFE:
Next M
Bob Off 64
Return
P2LF:
For M=1 To 8
If B2(M)<>1 or BS2(M)<=0 Then Goto P2LFEN
If M2(11+M)=1 Then Goto P2LFEN
Bob 64,BX2(M),BY2(M),64
MM=Amreg(0) : QX=MM
If BX2(M)<(MM+20) or BX2(M)>(MM+295) Then QX=BX2(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P2LFEN
Repeat : Until Mouse Key=0
M2(11+M)=1
If I Bob(18+M)=10 Then X=BX2(M)+124 : Y=BY2(M)+47
If I Bob(18+M)=12 Then X=BX2(M)+66 : Y=BY2(M)+47
If I Bob(18+M)=9 Then X=BX2(M)+93 : Y=BY2(M)+15
If I Bob(18+M)=11 Then X=BX2(M)+93 : Y=BY2(M)+80
If I Bob(18+M)=15 Then X=BX2(M)+80 : Y=BY2(M)+35
If I Bob(18+M)=13 Then X=BX2(M)+80 : Y=BY2(M)+74
If I Bob(18+M)=16 Then X=BX2(M)+110 : Y=BY2(M)+35
If I Bob(18+M)=14 Then X=BX2(M)+110 : Y=BY2(M)+74
R=50 : STR=1
Gosub PFIRE1 : Gosub P2FCHIT
P2LFEN:
Next M
Bob Off 64
Return
P2SF:
For M=1 To 5
If A2(M)<>1 Then Goto P2SFEN
If M2(6+M)=1 Then Goto P2SFEN
Bob 64,AX2(M),AY2(M),64
MM=Amreg(0) : QX=MM
If AX2(M)<(MM+20) or AX2(M)>(MM+295) Then QX=AX2(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P2SFEN
Repeat : Until Mouse Key=0
M2(6+M)=1
If I Bob(13+M)=1 Then X=AX2(M)+120 : Y=AY2(M)+47
If I Bob(13+M)=2 Then X=AX2(M)+76 : Y=AY2(M)+47
If I Bob(13+M)=3 Then X=AX2(M)+93 : Y=AY2(M)+25
If I Bob(13+M)=4 Then X=AX2(M)+93 : Y=AY2(M)+70
If I Bob(13+M)=6 Then X=AX2(M)+80 : Y=AY2(M)+35
If I Bob(13+M)=8 Then X=AX2(M)+80 : Y=AY2(M)+74
If I Bob(13+M)=5 Then X=AX2(M)+110 : Y=AY2(M)+35
If I Bob(13+M)=7 Then X=AX2(M)+110 : Y=AY2(M)+64
R=40 : STR=1
Gosub PFIRE1 : Gosub P2FCHIT
P2SFEN:
Next M
Bob Off 64
Return
P2CF:
If CS2<=0 Then Bell : Return
If M2(1)=1 Then Bell : Return
Bob 64,CX2,CY2,64
MM=Amreg(0) : QX=MM
If CX2<(MM+20) or CX2>(MM+295) Then QX=CX2-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
M2(1)=1
If I Bob(53)=42 or I Bob(53)=43 Then Goto P2CHF
If I Bob(53)=44 or I Bob(53)=45 Then Goto P2CVF
Return
P2CHF:
Bob 64,CX2-20,CY2,
STR=2
If I Bob(53)=42 Then STR=3
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX2+46 : Y=CY2+52 : R=70 : Gosub PFIRE1 : Gosub P2FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX2+15,CY2-15,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX2+110 : Y=CY2+20 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX2+45,CY2,
STR=2
If I Bob(53)=43 Then STR=3
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX2+145 : Y=CY2+50 : R=70 : Gosub PFIRE1 : Gosub P2FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX2+15,CY2+20,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX2+110 : Y=CY2+75 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Goto P2CHF
P2CVF:
Bob 64,CX2-10,CY2+15,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX2+66 : Y=CY2+60 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX2+2,CY2-15,
STR=2
If I Bob(53)=45 Then STR=3
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX2+85 : Y=CY2+10 : R=70 : Gosub PFIRE1 : Gosub P2FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX2+20,CY2+15,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX2+120 : Y=CY2+60 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Bob 64,CX2+2,CY2+40,
STR=2
If I Bob(53)=44 Then STR=3
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=CX2+80 : Y=CY2+110 : R=70 : Gosub PFIRE1 : Gosub P2FCHIT : Bob Off 64 : Return
Repeat
Until Mouse Key=0
Goto P2CVF
Return
P2DF:
For M=1 To 2
If DS2(M)<=0 Then Goto P2DFE
If M2(1+M)=1 Then Goto P2DFE
Bob 64,DX2(M),DY2(M),64
MM=Amreg(0) : QX=MM
If DX2(M)<(MM+20) or DX2(M)>(MM+295) Then QX=DX2(M)-150
If QX<0 Then QX=0
If QX>625 Then QX=625
Screen Offset 0,QX,0 : MM=QX
Repeat : Until Mouse Key=0
Repeat
Until Mouse Key<>0
If Mouse Key=1 Then Goto P2DFE
Repeat : Until Mouse Key=0
M2(1+M)=1
If I Bob(53+M)=25 or I Bob(53+M)=26 Then Gosub P2DHF
If I Bob(53+M)=27 or I Bob(53+M)=28 Then Gosub P2DVF
If I Bob(53+M)=29 or I Bob(53+M)=30 Then Gosub P2DRF
If I Bob(53+M)=31 or I Bob(53+M)=32 Then Gosub P2DLF
P2DFE:
Next M
Bob Off 64
Return
P2DHF:
Bob 64,DX2(M)-10,DY2(M),
STR=1
If I Bob(53+M)=25 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+65 : Y=DY2(M)+46 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)+10,DY2(M)-10,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+102 : Y=DY2(M)+16 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)+35,DY2(M),
STR=1
If I Bob(53+M)=26 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+138 : Y=DY2(M)+46 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)+10,DY2(M)+12,
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+102 : Y=DY2(M)+75 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Goto P2DHF
P2DVF:
Bob 64,DX2(M)-10,DY2(M)+10,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+66 : Y=DY2(M)+55 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)+2,DY2(M)-10,
STR=1
If I Bob(53+M)=27 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+90 : Y=DY2(M)+15 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)+12,DY2(M)+10,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+120 : Y=DY2(M)+60 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)+2,DY2(M)+30,
STR=1
If I Bob(53+M)=28 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+90 : Y=DY2(M)+100 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Goto P2DVF
Return
P2DRF:
Bob 64,DX2(M)-2,DY2(M),
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+75 : Y=DY2(M)+35 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)+22,DY2(M)-10,
STR=1
If I Bob(53+M)=30 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+115 : Y=DY2(M)+25 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)+14,DY2(M)+12,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+110 : Y=DY2(M)+65 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)-8,DY2(M)+20,
STR=1
If I Bob(53+M)=29 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+80 : Y=DY2(M)+80 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Goto P2DRF
Return
P2DLF:
Bob 64,DX2(M),DY2(M)+12,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+85 : Y=DY2(M)+60 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)-10,DY2(M)-10,
STR=1
If I Bob(53+M)=32 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+80 : Y=DY2(M)+25 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)+20,DY2(M)+2,
STR=1
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+110 : Y=DY2(M)+40 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Bob 64,DX2(M)+22,DY2(M)+20,
STR=1
If I Bob(53+M)=31 Then STR=2
Repeat
Until Mouse Key<>0
If Mouse Key=2 Then X=DX2(M)+115 : Y=DY2(M)+80 : R=50 : Gosub PFIRE1 : Gosub P2FCHIT : Return
Repeat
Until Mouse Key=0
Goto P2DLF
Return
P1FCHIT:
Repeat
Until Mouse Key=0
XX=XX+1 : YY=YY+1
X=X Screen(XX) : Y=Y Screen(YY) : ZO=Zone(X,Y)
Plot X,Y
If ZO=53 and CS2>0 Then Gosub PHIT : CS2=CS2-STR
If CS2<=0 Then Bob Off 53
For A=54 To 55
If ZO=A and DS2(A-53)>0 Then Gosub PHIT : DS2(A-53)=DS2(A-53)-STR
If DS2(A-53)<=0 Then Bob Off A
Next A
For A=56 To 58
If ZO=A and PS2(A-55)>0 Then Gosub PHIT : PS2(A-55)=PS2(A-55)-STR
If PS2(A-55)<=0 Then Bob Off A
Next A
If ZO=52 and GS2>0 Then Gosub PHIT : GS2=GS2-STR
If GS2<=0 Then Bob Off 52
If ZO=51 and MS2>0 Then Gosub PHIT : MS2=MS2-STR
If MS2<=0 Then Gosub P2DEAD
For A=49 To 50
If ZO=A and SS2(A-48)>0 Then Gosub PHIT : SS2(A-48)=SS2(A-48)-STR
If SS2(A-48)<=0 Then Bob Off A
Next A
For A=47 To 48
If ZO=A and LS2(A-46)>0 Then Gosub PHIT : LS2(A-46)=LS2(A-46)-STR
If LS2(A-46)<=0 Then Bob Off A
Next A
For A=43 To 46
If ZO=A and FS2(A-42)>0 Then Gosub PHIT : FS2(A-42)=FS2(A-42)-STR
If FS2(A-42)<=0 Then Bob Off A
Next A
For A=14 To 18
If ZO=A and A2(A-13)<>-1 and A2(A-13)=1 Then Gosub PHIT : A2(A-13)=-1 : Bob Off A
Next A
For A=19 To 26
If ZO=A and BS2(A-18)>0 and B2(A-18)=1 Then Gosub PHIT : BS2(A-18)=BS2(A-18)-STR
If BS2(A-18)<=0 Then Bob Off A
Next A
Return
P2FCHIT:
Repeat
Until Mouse Key=0
XX=XX+1 : YY=YY+1
X=X Screen(XX) : Y=Y Screen(YY) : ZO=Zone(X,Y)
Plot X,Y
If ZO=37 and CS1>0 Then Gosub PHIT : CS1=CS1-STR
If CS1<=0 Then Bob Off 37
For A=38 To 39
If ZO=A and DS1(A-37)>0 Then Gosub PHIT : DS1(A-37)=DS1(A-37)-STR
If DS1(A-37)<=0 Then Bob Off A
Next A
For A=40 To 42
If ZO=A and PS1(A-39)>0 Then Gosub PHIT : PS1(A-39)=PS1(A-39)-STR
If PS1(A-39)<=0 Then Bob Off A
Next A
If ZO=36 and GS1>0 Then Gosub PHIT : GS1=GS1-STR
If GS1<=0 Then Bob Off 36
If ZO=35 and MS1>0 Then Gosub PHIT : MS1=MS1-STR
If MS1<=0 Then Gosub P1DEAD
For A=33 To 34
If ZO=A and SS1(A-32)>0 Then Gosub PHIT : SS1(A-32)=SS1(A-32)-STR
If SS1(A-32)<=0 Then Bob Off A
Next A
For A=31 To 32
If ZO=A and LS1(A-30)>0 Then Gosub PHIT : LS1(A-30)=LS1(A-30)-STR
If LS1(A-30)<=0 Then Bob Off A
Next A
For A=27 To 30
If ZO=A and FS1(A-26)>0 Then Gosub PHIT : FS1(A-26)=FS1(A-26)-STR
If FS1(A-26)<=0 Then Bob Off A
Next A
For A=1 To 5
If ZO=A and A1(A)<>-1 and A1(A)=1 Then Gosub PHIT : A1(A)=-1 : Bob Off A
Next A
For A=6 To 13
If ZO=A and BS1(A-5)>0 and B1(A-5)=1 Then Gosub PHIT : BS1(A-5)=BS1(A-5)-STR
If BS1(A-5)<=0 Then Bob Off A
Next A
Return
Rem player craft hit
PHIT:
Boom
For B=50 To 54
Sprite 1,XX-8,YY-8,B
For T=1 To 1000 : Next T
Next B
Sprite 1,0,0,48
Return
Rem player 1 stat sheet
P1STAT:
Load Iff "iff/tech-craft-p1.iff",1
Screen To Front 1
Inc GTIME : Inc LFUEL : Inc PRODUCTION
For M=1 To 5
If A1(M)=1 Then Dec AF1(M)
If AF1(M)<=0 Then Bob Off M : A1(M)=-1
If A2(M)=1 Then Dec AF2(M)
If AF2(M)<=0 Then Bob Off(M+13) : A2(M)=-1
Next M
For M=1 To 8
If B1(M)=1 and LFUEL=5 Then Dec BF1(M)
If BF1(M)<=0 Then Bob Off(5+M) : B1(M)=0
If B2(M)=1 and LFUEL=5 Then Dec BF2(M)
If BF2(M)<=0 Then Bob Off(18+M) : B2(M)=0
Next M
If LFUEL=5 Then LFUEL=0
If PRODUCTION=10 Then Gosub REBUILD : PRODUCTION=0
Locate 28,19
Print GTIME
For M=1 To 30
M1(M)=0 : M2(M)=0
Next M
Repeat
Until Mouse Key=0
If GS1>0
Bar 65,45 To 65+GS1,50
Else
Draw 65,47 To 85,47
End If
If MS1>0
Bar 65,65 To 65+MS1,70
Else
Draw 65,67 To 85,67
End If
If CS1>0
Bar 65,82 To 65+CS1,87
Else
Draw 65,84 To 85,84
End If
For B=1 To 2
If DS1(B)>0
Bar 65,84+(B*16) To 65+DS1(B),89+(B*16)
Else
Draw 65,86+(B*16) To 85,86+(B*16)
End If
Next B
For B=1 To 3
If PS1(B)>0
Bar 65,116+(B*16) To 65+PS1(B),121+(B*16)
Else
Draw 65,116+(B*16) To 85,116+(B*16)
End If
Next B
For B=1 To 2
If LS1(B)>0
Bar 65,166+(B*18) To 65+LS1(B),171+(B*18)
Else
Draw 65,166+(B*18) To 85,166+(B*18)
End If
Next B
If FS1(1)>0
Bar 65,217 To 65+FS1(1),222
Else
0 Draw 65,219 To 85,219
End If
For B=2 To 4
If FS1(B)>0
Bar 140,5+(B*16) To 140+FS1(1),10+(B*16)
Else
Draw 140,10+(B*16) To 160,10+(B*16)
End If
Next B
For B=1 To 2
If SS1(B)>0
Bar 140,67+(B*16) To 140+SS1(B),72+(B*16)
Else
Draw 140,69+(B*16) To 160,69+(B*16)
End If
Next B
For B=1 To 8
If BS1(B)>0
Bar 140,102+(B*13) To 140+BS1(B),107+(B*13)
Else
Draw 140,104+(B*13) To 160,104+(B*13)
End If
Next B
For B=1 To 8
If B1(B)=0 Then Draw 145,104+(B*13) To 148,104+(B*13)
If BF1(B)=0
Draw 165,104+(B*13) To 185,104+(B*13)
Else
Bar 165,102+(B*13) To 165+BF1(B),107+(B*13)
End If
Next B
If A1(1)=1 or A1(1)=0 Then Draw 140,220 To 140,225
If A1(1)=0 Then Draw 145,222 To 148,222
If A1(1)=-1 Then Draw 140,222 To 160,222
If AF1(1)=0
Draw 165,222 To 185,222
Else
Bar 165,220 To 165+AF1(1),225
End If
For B=2 To 5
If A1(B)=1 or A1(B)=0 Then Draw 235,15+(B*12) To 235,20+(B*12)
If A1(B)=0 Then Draw 240,17+(B*12) To 243,17+(B*12)
If A1(B)=-1 Then Draw 235,15+(B*12) To 255,15+(B*12)
If AF1(B)=0
Draw 260,17+(B*12) To 280,17+(B*12)
Else
Bar 260,15+(B*12) To 260+AF1(B),20+(B*12)
End If
Next B
Repeat
Until Mouse Key<>0
Load Iff "iff/tech-craft-p2.iff",1
Locate 28,19
Print GTIME
Repeat
Until Mouse Key=0
If GS2>0
Bar 65,45 To 65+GS2,50
Else
Draw 65,47 To 85,47
End If
If MS2>0
Bar 65,65 To 65+MS2,70
Else
Draw 65,67 To 85,67
End If
If CS2>0
Bar 65,82 To 65+CS2,87
Else
Draw 65,84 To 85,84
End If
For B=1 To 2
If DS2(B)>0
Bar 65,84+(B*16) To 65+DS2(B),89+(B*16)
Else
Draw 65,86+(B*16) To 85,86+(B*16)
End If
Next B
For B=1 To 3
If PS2(B)>0
Bar 65,116+(B*16) To 65+PS2(B),121+(B*16)
Else
Draw 65,116+(B*16) To 85,116+(B*16)
End If
Next B
For B=1 To 2
If LS2(B)>0
Bar 65,166+(B*18) To 65+LS2(B),171+(B*18)
Else
Draw 65,166+(B*18) To 85,166+(B*18)
End If
Next B
If FS2(1)>0
Bar 65,217 To 65+FS2(1),222
Else
Draw 65,219 To 85,219
End If
For B=2 To 4
If FS2(B)>0
Bar 140,5+(B*16) To 140+FS2(1),10+(B*16)
Else
Draw 140,10+(B*16) To 160,10+(B*16)
End If
Next B
For B=1 To 2
If SS2(B)>0
Bar 140,67+(B*16) To 140+SS2(B),72+(B*16)
Else
Draw 140,69+(B*16) To 160,69+(B*16)
End If
Next B
For B=1 To 8
If BS2(B)>0
Bar 140,102+(B*13) To 140+BS2(B),107+(B*13)
Else
Draw 140,104+(B*13) To 160,104+(B*13)
End If
Next B
For B=1 To 8
If B2(B)=0 Then Draw 145,104+(B*13) To 148,104+(B*13)
If BF2(B)=0
Draw 165,104+(B*13) To 185,104+(B*13)
Else
Bar 165,102+(B*13) To 165+BF2(B),107+(B*13)
End If
Next B
If A2(1)=1 or A2(1)=0 Then Draw 140,220 To 140,225
If A2(1)=0 Then Draw 145,222 To 148,222
If A2(1)=-1 Then Draw 140,222 To 160,222
If AF2(1)=0
Draw 165,222 To 185,222
Else
Bar 165,220 To 165+AF2(1),225
End If
For B=2 To 5
If A2(B)=1 or A2(B)=0 Then Draw 235,15+(B*12) To 235,20+(B*12)
If A2(B)=0 Then Draw 240,17+(B*12) To 243,17+(B*12)
If A2(B)=-1 Then Draw 235,15+(B*12) To 255,15+(B*12)
If AF2(B)=0
Draw 260,17+(B*12) To 280,17+(B*12)
Else
Bar 260,15+(B*12) To 260+AF2(B),20+(B*12)
End If
Next B
Repeat
Until Mouse Key<>0
Repeat
Until Mouse Key=0
Screen To Front 0
Screen 0
Return
Rem p1 bomber
P1B:
If GTIME<50 or P1BOM=0 Then Bell : Return
Dec P1BOM
Screen Offset 0,625,0
Repeat
Until Mouse Key<>0
X=X Mouse : Y=Y Mouse
Repeat
Until Mouse Key=0
Screen Offset 0,0,0
Limit Mouse 160,100 To 160,100
For B=50 To 300 Step 1
Sprite 1,B,Y-8,33
For T=1 To 300 : Next T
Next B
For B=0 To 624 Step 2
Screen Offset 0,B,0
For T=1 To 300 : Next T
Next B
Screen Offset 0,625,0
For B=300 To 450
Sprite 1,B,Y-8,33
For T=1 To 300 : Next T
Next B
STR=2 : XT=X : YT=Y
XX=X-Rnd(30) : YY=Y+Rnd(15)-Rnd(20) : Gosub P1FCHIT : X=XT : Y=YT
XX=X-Rnd(15) : YY=Y+Rnd(15)-Rnd(20) : Gosub P1FCHIT : X=XT : Y=YT
XX=X : YY=Y+Rnd(5)-Rnd(10) : Gosub P1FCHIT : X=XT : Y=YT
XX=X+Rnd(15) : YY=Y+Rnd(15)-Rnd(20) : Gosub P1FCHIT : X=XT : Y=YT
XX=X+Rnd(30) : YY=Y+Rnd(15)-Rnd(20) : Gosub P1FCHIT
Limit Mouse 115,50 To 443,295
Return
Rem p2 bomber
P2B:
If GTIME<50 or P2BOM=0 Then Bell : Return
Dec P2BOM
Screen Offset 0,0,0
Repeat
Until Mouse Key<>0
X=X Mouse : Y=Y Mouse
Repeat
Until Mouse Key=0
Screen Offset 0,625,0
Limit Mouse 350,100 To 350,100
For B=450 To 200 Step -1
Sprite 1,B,Y-8,34
For T=1 To 300 : Next T
Next B
For B=624 To 0 Step -2
Screen Offset 0,B,0
For T=1 To 300 : Next T
Next B
For B=200 To 20 Step -1
Sprite 1,B,Y-8,34
For T=1 To 300 : Next T
Next B
STR=2 : XT=X : YT=Y
XX=X-Rnd(30) : YY=Y+Rnd(15)-Rnd(20) : Gosub P2FCHIT : X=XT : Y=YT
XX=X-Rnd(15) : YY=Y+Rnd(15)-Rnd(20) : Gosub P2FCHIT : X=XT : Y=YT
XX=X : YY=Y+Rnd(5)-Rnd(10) : Gosub P2FCHIT : X=XT : Y=YT
XX=X+Rnd(15) : YY=Y+Rnd(15)-Rnd(20) : Gosub P2FCHIT : X=XT : Y=YT
XX=X+Rnd(30) : YY=Y+Rnd(15)-Rnd(20) : Gosub P2FCHIT
Limit Mouse 115,50 To 443,295
Return
Rem p1 missle
P1M:
If GTIME<30 or P1MIS=0 Then Bell : Return
Dec P1MIS
Screen Offset 0,625,0
Repeat
Until Mouse Key<>0
X=X Mouse : Y=Y Mouse
Repeat
Until Mouse Key=0
Screen Offset 0,0,0
Limit Mouse 160,100 To 160,100
For B=50 To 115 Step 1
Sprite 1,B,Y-8,35
For T=1 To 200 : Next T
Next B
For B=0 To 624 Step 2
Screen Offset 0,B,0
For T=1 To 200 : Next T
Next B
Screen Offset 0,625,0
For B=115 To X-10
Sprite 1,B,Y-8,35
For T=1 To 200 : Next T
Next B
STR=1 : XT=X : YT=Y
X=X-5 : Y=Y-5 : Gosub PHIT
For QQ=1 To 10
X=XT : Y=YT
XX=X-Rnd(25)+Rnd(25) : YY=Y-Rnd(30)+Rnd(25)
Gosub P1FCHIT
Next QQ
Limit Mouse 115,50 To 443,295
Return
Rem p2 missle
P2M:
If GTIME<30 or P2MIS=0 Then Bell : Return
Dec P2MIS
Screen Offset 0,0,0
Repeat
Until Mouse Key<>0
X=X Mouse : Y=Y Mouse
Repeat
Until Mouse Key=0
Screen Offset 0,625,0
Limit Mouse 350,100 To 350,100
For B=450 To 420 Step -1
Sprite 1,B,Y-8,36
For T=1 To 200 : Next T
Next B
For B=624 To 0 Step -2
Screen Offset 0,B,0
For T=1 To 200 : Next T
Next B
For B=420 To X-10 Step -1
Sprite 1,B,Y-8,36
For T=1 To 200 : Next T
Next B
STR=1 : XT=X : YT=Y
X=X-5 : Y=Y-5 : Gosub PHIT
For QQ=1 To 10
X=XT : Y=YT
XX=X-Rnd(25)+Rnd(25) : YY=Y-Rnd(30)+Rnd(25)
Gosub P2FCHIT
Next QQ
Limit Mouse 115,50 To 443,295
Return
Rem check land for ships
CHECKLAND:
Q=0
If X<94 or X>871 Then Q=1 : Bell : Return
If Y>39 and Y<50 and X>131 and X<147 Then Q=1 : Bell : Return
If Y>96 and Y<135 and X>161 and X<188 Then Q=1 : Bell : Return
If Y>135 and Y<154 and X>157 and X<174 Then Q=1 : Bell : Return
If Y>174 and Y<195 and X>122 and X<141 Then Q=1 : Bell : Return
If Y>115 and Y<122 and X>410 and X<419 Then Q=1 : Bell : Return
If Y>44 and Y<51 and X>532 and X<542 Then Q=1 : Bell : Return
If Y>51 and Y<75 and X>798 and X<821 Then Q=1 : Bell : Return
If Y>182 and Y<193 and X>827 and X<838 Then Q=1 : Bell : Return
If Y>209 and Y<228 and X>767 and X<797 Then Q=1 : Bell : Return
If Y>102 and Y<133 and X>789 and X<814 Then Q=1 : Bell : Return
If Y>133 and Y<163 and X>773 and X<798 Then Q=1 : Bell : Return
Return
Rem land player 1 short fighter
P1SLL:
If CS1<=0 Then Bell : Return
For M=1 To 5
If A1(M)=-1 or A1(M)=0 Then Goto NNEXT
If AY1(M)>(CY1-10) and AY1(M)<(CY1+23) and AX1(M)>(CX1-10) and AX1(M)<(CX1+45) Then Bob Off(0+M) : A1(M)=0
NNEXT:
Next M
Return
Rem land player 2 short fighter
P2SLL:
If CS2<=0 Then Bell : Return
For M=1 To 5
If A2(M)=-1 or A2(M)=0 Then Goto P2NNEXT
If AY2(M)>(CY2-10) and AY2(M)<(CY2+23) and AX2(M)>(CX2-10) and AX2(M)<(CX2+45) Then Bob Off(13+M) : A2(M)=0
P2NNEXT:
Next M
Return
Rem land player 1 long fighter
P1LLL:
If GS1<=0 Then Bell : Return
Screen Offset 0,0,0
For M=1 To 8
If BS1(M)<=0 or B1(M)=0 Then Goto P1LNEXT
If BY1(M)>(AAY1-10) and BY1(M)<(AAY1+25) and BX1(M)>(AAX1-10) and BX1(M)<(AAX1+65) Then Bob Off(5+M) : BS1(M)=2 : B1(M)=0
P1LNEXT:
Next M
Return
Rem land player 2 long fighter
P2LLL:
If GS1<=0 Then Bell : Return
Screen Offset 0,625,0
For M=1 To 8
If BS2(M)<=0 or B2(M)=0 Then Goto P2LNEXT
If BY2(M)>(AAY2-10) and BY2(M)<(AAY2+25) and BX2(M)>(AAX2-10) and BX2(M)<(AAX2+65) Then Bob Off(18+M) : BS2(M)=2 : B2(M)=0
P2LNEXT:
Next M
Return
Rem time to rebuild
REBUILD:
Bell 20
If CS1<10 and CS1>0 Then Inc CS1 : Inc CS1
If CS2<10 and CS2>0 Then Inc CS2 : Inc CS2
If GS1<25 and GS1>0 Then Inc GS1
If GS2<25 and GS2>0 Then Inc GS2
For A=1 To 2
If DS1(A)<6 and DS1(A)>0 Then Inc DS1(A)
If DS2(A)<6 and DS2(A)>0 Then Inc DS2(A)
If SS1(A)<5 and SS1(A)>0 Then Inc SS1(A)
If SS2(A)<5 and SS2(A)>0 Then Inc SS2(A)
If LS1(A)<5 and LS1(A)>0 Then Inc LS1(A)
If LS2(A)<5 and LS2(A)>0 Then Inc LS2(A)
Next A
For A=1 To 3
If PS1(A)<3 and PS1(A)>0 Then Inc PS1(A)
If PS2(A)<3 and PS2(A)>0 Then Inc PS2(A)
Next A
For A=1 To 4
If FS1(A)<3 and FS1(A)>0 Then Inc FS1(A)
If FS2(A)<3 and FS2(A)>0 Then Inc FS2(A)
Next A
Q1=1 : Q2=1
For A=1 To 5
If A1(A)=-1 and Q1=1 and CS1>0 Then A1(A)=0 : AF1(A)=10 : Q1=0
If A2(A)=-1 and Q2=1 and CS2>0 Then A2(A)=0 : AF2(A)=10 : Q2=0
Next A
Q1=1 : Q2=1
For A=1 To 8
If BS1(A)<=0 and Q1=1 and GS1>0 Then BS1(A)=2 : B1(A)=0 : Q1=0
If BS2(A)<=0 and Q2=1 and GS2>0 Then BS2(A)=2 : B2(A)=0 : Q2=0
Next A
Return
P2DEAD:
Screen Open 0,320,200,32,Lowres
Load Iff "iff/mountain.iff",0
Load "sprites/end-game.abk"
Get Sprite Palette
Paste Bob 110,20,1
Paste Bob 150,20,2
Paste Bob 115,40,3
Paste Bob 180,40,5
Repeat : Until Mouse Key=0
Repeat : Until Mouse Key<>0
Do : Loop
Return
P1DEAD:
Screen Open 0,320,200,32,Lowres
Load Iff "iff/mountain.iff",0
Load "sprites/end-game.abk"
Get Sprite Palette
Paste Bob 110,20,1
Paste Bob 150,20,2
Paste Bob 115,40,3
Paste Bob 180,40,4
Repeat : Until Mouse Key=0
Repeat : Until Mouse Key<>0
Do : Loop
Return